#include "stdafx.h"
#include <string>

DESCRIPTION_11_TEST_SUITE_CTOR(StreamOutDeclaration, (0, "POSITION"))

BOOST_FIXTURE_TEST_CASE(Default, TestStreamOutDeclaration)
{
	BOOST_REQUIRE_EQUAL(0, m_desc.Stream);
	BOOST_REQUIRE_EQUAL(std::string("POSITION"), m_desc.SemanticName);
	BOOST_REQUIRE_EQUAL(0, m_desc.SemanticIndex);
	BOOST_REQUIRE_EQUAL(0, m_desc.StartComponent);
	BOOST_REQUIRE_EQUAL(1, m_desc.ComponentCount);
	BOOST_REQUIRE_EQUAL(0, m_desc.OutputSlot);
}

BOOST_FIXTURE_TEST_CASE(SemanticName_, TestStreamOutDeclaration)
{
	LPCSTR semanticName = m_desc.SemanticName_("TEXCOORD0").SemanticName;
	BOOST_REQUIRE_EQUAL(std::string("TEXCOORD0"), semanticName);
}

#define STREAM_OUT_DECLARATION_TEST_CASE(type_, name_, value_) \
	DESCRIPTION_11_SETTER_TEST_CASE(type_, name_, value_, StreamOutDeclaration)

STREAM_OUT_DECLARATION_TEST_CASE(UINT, SemanticIndex, 2)
STREAM_OUT_DECLARATION_TEST_CASE(BYTE, StartComponent, 2)
STREAM_OUT_DECLARATION_TEST_CASE(BYTE, ComponentCount, 2)
STREAM_OUT_DECLARATION_TEST_CASE(BYTE, OutputSlot, 2)

BOOST_AUTO_TEST_SUITE_END()
